
<%@page import="th.com.entity.UserEntity"%>
<%@page import="java.util.Locale"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="css/view.css" type="text/css"/>     
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/function.js"></script>
        <title><bean:message key="welcome.title"/></title>
        <html:base/>
        <script>
            function goLogin() {
                redirect("${pageContext.request.contextPath}/login.do?dispatch=doLogin","_top");
            }
        </script>
        <% 
            Locale.setDefault(Locale.US);
            String isUsername = "";
            if (session.getAttribute("isUsername") != null) {
                isUsername = ((UserEntity)session.getAttribute("isUsername")).getUseId();;
            }
        %>

    </head>

    <html:form action="/login.do" >

        <div class="loginlayout">
            <div class="container">

                <div class="header">
                    <img src="img/title_ku.jpg" width="960" height="120" />
                </div> 
                <div class="tablogin2">
                    <table>
                        <tr>
                            <td></td>                        
                        </tr>
                    </table>
                </div>
                <div class="contentMid">
                    <table align="center" class="Subthree"> 

                        <tr>
                            <td colspan="2" bgcolor="#4ba105"><div align="center"><h4>เข้าสู่ระบบ</h4></div></td>
                        </tr>
                        <tr>
                            <td width="158">ชื่อผู้ใช้ :</td>
                            <td width="230">
                                <html:text name="loginForm" property="userName" size="25" value="" >           
                                </html:text>                
                            </td>
                        </tr>
                        <tr>
                            <td>รหัสผ่าน :</td>
                            <td>
                                <html:password name="loginForm" property="userPassword" size="25" >  
                                </html:password>                    
                            </td>                

                        </tr>
                        <tr>
                            <td colspan="2">
                                <div align="center">
                                    <html:button property="btnSubmit" value="Login" onclick="goLogin();">  
                                    </html:button>    
                                </div>
                            </td>
                        </tr>


                    </table> 
                </div>


                <div class="footer">
                    <p>Compensation Approval Application for Instruction in Special Program </p>
                </div>            
            </div>            
        </div>

    </html:form>
</html:html>